package com.ruoyi.teaching.index;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "course_schedule")
public class CourseSchedule {

    @Id
    @JsonIgnore
    private String id;

    @Field(name = "class_id", type = FieldType.Keyword)
    @JsonIgnore
    private String classId;

    @Field(name = "course_design_detail_id", type = FieldType.Keyword)
    @JsonIgnore
    private String courseDesignDetailId;

    @Field(name = "course_id", type = FieldType.Keyword)
    @JsonIgnore
    private String courseId;

    @Field(type = FieldType.Keyword)
    @JsonIgnore
    private String teacher;

    @Field(name = "date", type = FieldType.Date, format = DateFormat.date)
    private String date;

    @Field(name = "class_name", type = FieldType.Text)
    private String className;

    @Field(name = "stage", type = FieldType.Long)
    private Long stage;

    @Field(name = "weekday", type = FieldType.Long)
    private Long weekday;

    @Field(name = "day", type = FieldType.Long)
    private Long day;

    @Field(name = "course_content", type = FieldType.Text)
    private String courseContent;

    @Field(type = FieldType.Text)
    private String remarks;
}